import axios from 'axios'
//生成实例，作用解决cookie无法生成的问题
axios.defaults.withCredentials = true

const instance = axios.create({
    baseURL:'http://linweiqin.cn:8001'
})

// axios.interceptors.request.use(function (config) {
    
// })

instance.interceptors.response.use(function (response) {
    return response.data
}, function (error) {
    return Promise.reject(error);
})

export default instance